Skip to main content

All Questions

Tagged with
9votes
3answers
573views

Parsing SFV files to extract and store the hashes

Similar to the class for the RAR file, now a class to extract and store the hashes from SFV files. Though this was considerably easier, there has been some code reorganisation: there is now an ...
viuser's user avatar
5votes
5answers
840views

Bracket matching - Advent of Code 2021 Day 10

The following code solves Advent Of Code 2021 Day 10. The goal for this time around is evaluating whether a line of brackets is complete, has a syntax error or is missing some closing brackets. ...
138 Aspen's user avatar
0votes
2answers
183views

Parsing information from german vocabulary [closed]

I am a beginner programmer and I want you to look at my code and let me know if i could improve something. First I have to enter the words in German, and then we have a loop that goes through each ...
Snowking's user avatar
3votes
1answer
223views

Parsing Java's class file

The structure of a class file consists of a single structure (presented here using pseudostructures written in a C-like structure notation): ...
Madagascar's user avatar
2votes
1answer
200views

Evaluate a prefix expression

The algorithm involves using two stacks. One stack (call it token_stack) holds the operators (like +, - etc) and operands (like 3,4 etc) and the other stack (call it count_stack) holds the number of ...
Madagascar's user avatar
2votes
2answers
121views

Evaluating Polish Prefix Notation and Polish Postfix Notation

In Polish postfix notation, the operators follow their operands. For example, to add 3 and 4 together, the expression is 3 4 + rather than 3 + 4. The conventional notation expression 3 − 4 + 5 becomes ...
Madagascar's user avatar
3votes
2answers
176views

Simple Python text file Parser and Converter

I wrote a simple text parser and a converter using Python 3.12.1. The purpose is to read a text file that contains 20000 words one per line, and create an output file that contains all the queries. ...
friday-json's user avatar
7votes
4answers
445views

Separating a String of Text into Separate Words in Python

Occasionally, we want to do a rudimentary parsing on English text; we separate the text into separate words. ...
Samuel Muldoon's user avatar
5votes
1answer
196views

constraint solving graduation using HTML Parsing, pandas, and z3

not sure if this project fits on code review, but my code is getting extremely messy, and would love some tips to clean it up! Overview The project is designed to take in an HTML file (a degree audit),...
retep's user avatar
1vote
2answers
387views

Creating a dictionary from a word document using docx

I have a word document that contains alphabetical bullet points along with the key: value that I am trying to input into a dictionary using docx. Example: ...
Brendan S's user avatar
3votes
1answer
306views

Generating indent and dedent tokens for python-style indenting code

I found lexy, a C++ template-based parser combinator, that helps a lot to build a language parser. The problem is that lexy can only deal with context free grammar, and python indentation is not ...
jokoon's user avatar
1vote
1answer
77views

Checking several strings against a n-depth list of lists and returning one if its values

The data structure I am working with is a list of lists that is created by parsing a file. The depth of the list can vary. The list can have n Strings before its child-value begins. My current example ...
Qohelet's user avatar
2votes
0answers
222views

Pillow plugin adding support for the QOI image format

Pillow is a popular library for handling images in Python. My code adds support for the QOI image format to Pillow. Aside from loading and saving QOI images, my goal was to write a streaming decoder ...
gazoh's user avatar
  • 3,379
4votes
1answer
290views

Processing lines of a file with various space-separated fields of strings, hex addresses, and integer addresses

I have a plain text file which contains lines with fields below: ...
Martin's user avatar
1vote
1answer
84views

Parsing an XML tree of categories

I have parse function which is parsing tree of categories. I've written it in simplest way possible and now struggling with refactoring it. Every nested loop is doing the same stuff but appending ...
Alex's user avatar

153050per page
close